package com.wc.fortnight_blue_bridge.Q231019.赏花宴;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

/**
 * @Author congge
 * @Date 2024/10/20 1:43
 * @description https://www.lanqiao.cn/problems/19933/learning/?contest_id=212
 */
public class Main {
    /**
     * 二分, 数量就好了
     */
    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    static int N = 100010;
    // num[i] 表示前面还有几个没在里面的, 需要去重
    static int[] a = new int[N], num = new int[N];
    static int n, q;

    public static void main(String[] args) {
        n = sc.nextInt();
        q = sc.nextInt();
        for (int i = 1; i <= n; i++) a[i] = sc.nextInt();
        Arrays.sort(a, 1, n + 1);
        int j = 1;
        for (int i = 1; i <= n; i++) {
            if (a[j] != a[i]) a[++j] = a[i];
        }
        n = j;
        for (int i = 1; i <= n; i++) num[i] = num[i - 1] + a[i] - a[i - 1] - 1;
        while (q-- > 0) {
            int k = sc.nextInt();
            int l = 1, r = n;
            while (l < r) {
                int mid = l + r + 1 >> 1;
                if (num[mid] < k) l = mid;
                else r = mid - 1;
            }
            int res = k - num[l] + a[l];
            out.println(res);
        }
        out.flush();
    }
}

class FastReader {
    StringTokenizer st;
    BufferedReader br;

    FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    String nextLine() {
        String s = "";
        try {
            s = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return s;
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    // 是否由下一个
    boolean hasNext() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = br.readLine();
                if (line == null)
                    return false;
                st = new StringTokenizer(line);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return true;
    }
}
